package com.lovo.commodity.dao;

import com.lovo.common.bean.CommodityBean;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface IESCommodityDAO extends ElasticsearchRepository<CommodityBean,Long> {
    List<CommodityBean> findAllByCommName(String name);
    @Query("{\"match\":{\"commName\":\"?0\"}}")
    List<CommodityBean> findByName(String name);
}
